One possible way could be with the use of CASE statement where the column that needs to be updated depends on some other column value.

A small example:
-- Create the table
CREATE TABLE t_bh ( a...