I have a table called Dummy, On that column are Dm_Ex, Dm_SL, Dm_Ad all data type numeric.
What I want if Dm_Ex>0 then ‘Ex’ if Dm_SL>0 then ‘SL’ if Dm_Ad>0 then ‘AD’
Dm_Ex
Dm_SL
Dm_Ad
Result Want
1
0
EX,AD
EX,SL,AD
SL,AD
EX
I used case but not success.
CASE WHEN Dm_Ex > 0 THEN 'EX' WHEN Dm_SL > 0 THEN 'SL' WHEN Dm_Ad > 0 THEN 'AD' ELSE 'N/A' END