Is it possible to do a query that contains an if
? What I'd like to do is to select two certain columns based on the value of another column in the same table.
So if the value of column1
is 0
, I'd like to select custom1
and custom2
, if it's 1
, I'd like to select custom3
and custom4
.