Это немного сумбурно и полагается, что у вас есть столбец идентификатора, однако, я думаю, это то, что вам нужно:
WITH CTE AS(
SELECT S.YourID,
S.name1,
S.name2,
S.name3,
S.street,
S.zip,
S.city,
NULLIF(V.Adr,'') AS Adr,
Line,
ROW_NUMBER() OVER (PARTITION BY YourID, CASE WHEN NULLIF(V.Adr,'') IS NULL THEN 1 ELSE 0 END ORDER BY Line) AS RN
FROM (VALUES(1, 'Some name',CONVERT(varchar(10),NULL),'','Some street','12345',CONVERT(varchar(10),NULL))) S(YourID,name1,name2,name3,street,zip,city)
CROSS APPLY(VALUES(name1,1),(name2,2),(name3,3),(street,3),(zip,4),(city,5)) V(Adr,Line))
SELECT C.YourID,
MAX(C.name1) AS name1,
MAX(C.name2) AS name2,
MAX(C.name3) AS name3,
MAX(C.street) AS street,
MAX(C.zip) AS zip,
MAX(C.city) AS city,
MAX(CASE WHEN C.RN = 1 THEN C.Adr END) AS Adr1,
MAX(CASE WHEN C.RN = 2 THEN C.Adr END) AS Adr2,
MAX(CASE WHEN C.RN = 3 THEN C.Adr END) AS Adr3,
MAX(CASE WHEN C.RN = 4 THEN C.Adr END) AS Adr4,
MAX(CASE WHEN C.RN = 5 THEN C.Adr END) AS Adr5,
MAX(CASE WHEN C.RN = 6 THEN C.Adr END) AS Adr6
FROM CTE C
WHERE C.Adr IS NOT NULL
GROUP BY C.YourID;