Determine the name of the column with a null value nearest the last column I have five columns in a mysql table

-id
-field_1
-field_2
-field_3
-field_4
-field_5

Field_5 is the last column of the table i have named transactions. If i have a select statement like
select * from transactions where id = 4,how would i know the name of the column nearest the column field_5 that is null.
Try this

select 
    case when field_4 is null then 'field_4'
         when field_3 is null then 'field_3'
         when field_2 is null then 'field_2' 
         when field_1 is null then 'field_1' 
                              else null 
    end 
from transactions;