Can I use a nested IF condition in a Select query? I want to query different columns in the same table depending on what is the value of the given attribute.
The psuedo code for the query looks like
Select colA, colB,
(If colC > 0 then colD
Else (if ColE>0 then ColF
Else (if ColG > 0 then ColH)))
From TableName.
Thanks.