SELECT t1.ID, t1.Desc, t1.TextFld FROM #Tbl_A t1 JOIN (SELECT DISTINCT ID FROM #Tbl_A WHERE Desc LIKE 'Test%') AS t2 ON t1.ID = t2.ID