I have one table “DataDollar”…and 2 columns “LineNmbr” & “DollarAmt” in that.
I need to display this column values as in three columns depending upon their values.
Please help me !
SELECT
DollarAmt AS
CASE LineNmbr
WHEN 19
THEN 'A-Amt'
WHEN 20
THEN 'P-Amt'
ELSE
'D-Amt'
END
FROM DataDollar
Try using three case expressions, one for each column in the result set: