Assuming you only need to list 5 children, this query will work:
with T as (
select P.Name as ParentName,
C.Name as ChildName,
row_number() over (partition by P.ParentId order by C.ChildId) as N
from ParentTable P join ChildTable C on P.ParentId = C.ParentId
)
select ParentName,
max(case when N = 1 then ChildName else '' end) as '1st-child',
max(case when N = 2 then ChildName else '' end) as '2nd-child',
max(case when N = 3 then ChildName else '' end) as '3rd-child',
max(case when N = 4 then ChildName else '' end) as '4th-child',
max(case when N = 5 then ChildName else '' end) as '5th-child'
from T
group by ParentName
source
share