Query to sort data from a MYSQL 8 table
Do it directly:

SELECT idscore,
       ndeporte,
       category,
       gender,
       'ROJO' team1,
       CASE WHEN team1 = 'ROJO' THEN score1
            WHEN team2 = 'ROJO' THEN score2
            WHEN team3 = 'ROJO' THEN score3
            END score1,
       'AMARILLO' team2,
       CASE WHEN team1 = 'AMARILLO' THEN score1
            WHEN team2 = 'AMARILLO' THEN score2
            WHEN team3 = 'AMARILLO' THEN score3
            END score2,
       'TURQUESA' team3,
       CASE WHEN team1 = 'TURQUESA' THEN score1
            WHEN team2 = 'TURQUESA' THEN score2
            WHEN team3 = 'TURQUESA' THEN score3
            END score1
FROM score;