Select ID
,email as EMail
,phone as Phone
From (
....
) aaa
pivot (max([Data]) for [Name] in ([email],[phone]) ) pvt
Если ваша система не чувствительна к регистру, вы можете обойтись с
Select *
From (
....
) aaa
pivot (max([Data]) for [Name] in ([Email],[Phone]) ) pvt