I think everytime you are asking different question without answering posts.anywaysReply of your last post - What if count of j and w is not same ?In this case if you want to show NULL then use this - DECLARE @Table AS TABLE ( emp_id int, emp_name VARCHAR(30) ) INSERT INTO @TableSELECT 1 , 'jog' UNION ALLSELECT 2 , 'bang' UNION ALL SELECT 3 , 'witz' UNION ALLSELECT 4 , 'xlmz' UNION ALLSELECT 5 , 'john'SELECT CASE WHEN Emp_Name LIKE 'j%' THEN Emp_Name ELSE NULL END 'J' ,CASE WHEN Emp_Name LIKE 'w%' THEN Emp_Name ELSE NULL END 'W'FROM @Table
Vaibhav TTo walk FAST walk ALONE To walk FAR walk TOGETHER