PostgreSQL; Update different column on condition using CASE statement
It is to be something like (logic only)

update table_A
set column_A = case when     (column_A&gt;table_B.balance) then value else column_A end,
    column_B = case when not (column_A&gt;table_B.balance) 
                     and     (column_B&gt;table_B.balance) then value else column_B end,
    column_C = case when not (column_A&gt;table_B.balance) 
                     and not (column_B&gt;table_B.balance)
                     and     (column_C&gt;table_B.balance) then value else column_C end
from table_B
on table_A.Id=table_B.id