I have a table tbl_emp_details and I want to do something like thisemp_id action_flag action_code100 25 0100 50 1100 75 1100 91 0100 15 0
I can get my result using the below query but I want to get it in a single rowSelect emp_id,case when action_code = 0 then 'Y' else 'N' end as emp_attorney_flag Where emp_id=100 and action_flag=25Select emp_id,case when action_code = 0 then 'Y' else 'N' end as emp_citizen_flag Where emp_id=100 and action_flag=50Select emp_id,case when action_code = 0 then 'Y' else 'N' end as emp_contract_flag Where emp_id=100 and action_flag=75
I want to have result likeemp_id emp_attorney_flag emp_citizen_flag emp_contract_flag100 N Y Y