In store procedures, sometimes you need to get some specific value/s or the entire row/s then make some changes on them or send these values to another store procedures. If you want to store select result for whatever purpose, CURSORs are just for you.
You can change the value of a selected column with the help of conditions. In select statement, case-when-statement takes if-statement’s place.
CASE WHEN condition_statement THEN if_value ELSE else_value END AS column_name