Lo he solucionado, pero quizá de la forma incorrecta, aunque la respuesta es la que estoy buscando
Código SQL:
Ver originalDECLARE @var1 INT, @var3 INT, @var5 INT
SET @var1 = (SELECT COUNT(semestre)/5 FROM Promedio WHERE Alumno.semestre=1)
SET @var3 = (SELECT COUNT(semestre)/5 FROM Promedio WHERE Alumno.semestre=3)
SET @var5 = (SELECT COUNT(semestre)/5 FROM Promedio WHERE Alumno.semestre=5)
SELECT id_alumno, nombre, semestre, Promedio
FROM (SELECT TOP(@var1) id_alumno, nombre, semestre, Promedio
FROM Alumno
WHERE semestre = 1
ORDER BY promedio DESC) AS a
UNION ALL
SELECT id_alumno, nombre, semestre, Promedio
FROM (SELECT TOP(@var3) id_alumno, nombre, semestre, Promedio
FROM Alumno
WHERE semestre = 3
ORDER BY promedio DESC) AS b
UNION ALL
SELECT id_alumno, nombre, semestre, Promedio
FROM (SELECT TOP(@var5) id_alumno, nombre, semestre, Promedio
FROM Alumno
WHERE semestre = 5
ORDER BY promedio DESC) AS c;