I am struck at writing a query.
Here I want to show the column name based on some specific value
For Instance, my table is like this:
id | fruits |vegetables |softdrink
-----------------------
1 | apple | Onion | Pepsi
2 | mango | Potato | Coke
3 | banana | Bringal | RedBull
If I have a value "mango", then I should get the column name as fruit or
If I have a value "RedBull", then I should get the column name as softdrink
NOTE: I have many columns around 48 to get the name from any one of them
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…