I have following table structure (Table Name is Questions)
c1 c2 c3 Selection
X Y Z 2
A B C 3
Here c1,c2,c3 and Selection are column names. I want to retrieve value of c1 or c2 or c3 on the basis of value of column Selection. Eg. If Selection value is 2 then I want corresponding value of c2 column i.e. Y. If Selection value is 3 then it should select value of c3 column which is C here.
Please help me in forming Select Sql query here. I tried myself but was not able to find correct solution.
Thanks in advance