ここでは PHP ソリューションの方が優れていますが、MySQL クエリだけが必要な場合は、次のように使用できます。
SELECT
Name,
SUBSTRING_INDEX(SUBSTRING_INDEX(Levels, ',', 1), ',', -1) Top1,
SUBSTRING_INDEX(SUBSTRING_INDEX(Levels, ',', 2), ',', -1) Top2,
SUBSTRING_INDEX(SUBSTRING_INDEX(Levels, ',', 3), ',', -1) Top3,
SUBSTRING_INDEX(SUBSTRING_INDEX(Levels, ',', 4), ',', -1) Top4,
SUBSTRING_INDEX(SUBSTRING_INDEX(Levels, ',', 5), ',', -1) Top5
FROM (
SELECT Name, GROUP_CONCAT(Level ORDER BY Level DESC) Levels
FROM (
SELECT Name, Level1 Level FROM yourtable
UNION ALL
SELECT Name, Level2 FROM yourtable
UNION ALL
SELECT Name, Level3 FROM yourtable
UNION ALL
SELECT Name, Level4 FROM yourtable
UNION ALL
SELECT Name, Level5 FROM yourtable
UNION ALL
SELECT Name, Level6 FROM yourtable
UNION ALL
SELECT Name, Level7 FROM yourtable
UNION ALL
SELECT Name, Level8 FROM yourtable
UNION ALL
SELECT Name, Level9 FROM yourtable
UNION ALL
SELECT Name, Level10 FROM yourtable
UNION ALL
SELECT Name, Level11 FROM yourtable
UNION ALL
SELECT Name, Level12 FROM yourtable
) s
GROUP BY Name
) s
ここでフィドルを参照してください。