Table1:-
ID NAME ADDRESS
1 TEST1 qwr
2 TEST2 sdf
I wanted to get column name in the select query based on ID column value
EX:-
If the Id=1 i want "name" column in select query if id=2 i want "address" column in select query
select name from table (when id=1)
select address from table(when id=2)
I hope i conveyed my query clearly.