SELECT
status,
case
when status = 'A' then 'Good - Contract Finished'
when status = 'B' then 'Defaulter'
when status = 'C' then 'Good - Contract Running'
-- Function to define in the column 'status' the letter 'A,B,C'
else 'In Debt'
-- the 'else' is to return 'In Debt' if doesnt find the defined letters
end as 'Status_Description'
-- every case statement as the have an 'end', and creating an alias with 'as'
FROM bank.loan;