I have the following code:
SELECT
A,
IF B > C
(SELECT B)
ELSE
(SELECT C),
D
FROM MyTable
A, B, C and D are integer columns in MyTable.
I get "incorrect syntax near the keyword 'IF' "
I'm playing with parentheses but I can't get it to work.
What's wrong with my syntax??
Thanks,
Bjorn