Puede utilizar la agregación condicional:
select ad_id,
max(case when name = 'name' then valueofname end) as name,
max(case when name = 'age' then valueofname end) as age,
max(case when name = 'birthday' then valueofname end) as birthday,
max(case when name = 'job' then valueofname end) as job
from t
group by ad_id;
En SQL Server, también puede hacer algo similar con pivot
.