I have table with data as below
I have got result to convert one column to multiple columns. But I need output to convert multiple columns
The result is expected as below
Output needed as
Name Q1 G1 Q2 G2 Q3 G3
Antony HSE A Degree C NULL NULL
Bob HSE B Degree B Masters A
Marc HSE D Degree C Masters B

If those Qualifications have fixed values, then you can get that result via conditional aggregation.
If the qualification names aren't fixed, then you could generate a row_number and use that.
Then you can add as many Qn & Gn as a Name can have qualifications.
To test that:
select top 1 [Name], count(*) Total from @YourTable group by [Name] order by Total descOr doing it dynamic
A test on db<>fiddle here