I thing you required cross table type output.
So here I am putting an example that hope will help you out.
select * from Table_1
pivot (max (id) for Name in ([A],[B],[C],[D])) as NameIDDets
You can customized it and google about ms sql server pivot for more details.
Have a good day !!!