I'm trying to output a number of different fields dependent upon a value found using the CASE statement as follows:
SELECT
CASE COL1
WHEN '1' THEN COL2, COL3, COL4
WHEN '2' THEN COL5, COL6, COL7
END
FROM TABLE1
But it is erroring saying that the ',' is invalid.
This leads me to wonder whether it is possible?
Any help anybody?
SELECT
CASE COL1
WHEN '1' THEN COL2, COL3, COL4
WHEN '2' THEN COL5, COL6, COL7
END
FROM TABLE1
But it is erroring saying that the ',' is invalid.
This leads me to wonder whether it is possible?
Any help anybody?