You have to use
PIVOT[
^].
SELECT LabelText, [judge1], [judge2], [judge3]...
FROM
(
SELECT *, CONCAT('judge', CONVERT(VARCHAR(50), ROW_NUMBER() OVER(PARTITION BY qst_id ORDER BY judge_id)) AS judgeNo
FROM YoutTable
) dt
PIVOT(SUM(Score) FOR judgeNo IN ([judge1], [judge2], [judge3]...)) pvt
Related topic:
ROW_NUMBER (Transact-SQL) - SQL Server | Microsoft Docs[
^]