Determine the name of the column with a null value nearest the last column
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;