This query produces your desired output. Dunno if this is what you really want:declare @t table (PONbr varchar(20), POValue decimal(18,2), DCNum int, InvoiceNbr int)insert into @t values('14/90549', 1661359.9, 2069, 769),('14/90549', 1661359.9, 2118, 1152),('14/90549', 1661359.9, 1152, 1152),('14/90549', 1661359.9, 2148, 808),('14/90549', 1661359.9, 2276, 1265),('14/90549', 1661359.9, 2254, 836),('14/90549', 1661359.9, 9, 5)select PONbr , case InvoiceNbr when 769 then POValue else 0.0 end as POValue , DCNum , InvoiceNbrfrom @t