если столбец 2 пустой
( [CustomerID] [int] NOT NULL, [A] [int] NULL, [B] [int] NULL ) select CustomerID, case when A is null and B is null then 0 else 0 end as C, case when A is not null and B is not null then A else 0 end as A, case when A is not null and B is not null then B else 0 end as B from Customers