Is there away to select a table column on a condition ?, in this query :
SELECT x,y FROM Z
I want to make selecting the y column Y is conditioned, as:
SELECT x ( ONLY WHERE x_type = '20' ), y FROM Z # just example of what i am trying to do :)
y_type is another column, it’s value is what on which selecting Y or not depends !, Is there away to do that, or i am just hitting the wrong door ?
You can also use a CASE with IN for multiple values eg.