This solution is quite generic.
It works with gaps in your primary key as well as being very easy to change the number of columns in the query.
Manchanx solution should be faster though.
WITH ordered AS (
SELECT name
,Row_Number() OVER (ORDER BY name) -1 AS rn
from table1
)
,modded as (
select name
,Mod(rn,3) m
,Floor(rn/3) r
from ordered
)
SELECT *
FROM modded
pivot (
Max(name)
for m
IN (0 as name,1 as name1,2 as name2)
)
ORDER BY r