As far as you can understand or what I could understand, your solution could be made with the UNNION ALL clause an example would be the following:
(
SELECT
sonido.nombre AS S,
sonido.ruta AS R
FROM
sud_cat
INNER JOIN sonido ON sonido.id_cat = sud_cat.id_sub_cat
WHERE sud_cat.sub_cat = 'Intro'
ORDER BY RAND()
LIMIT 3
)
UNION ALL
(
SELECT
video.nombre AS S,
video.fech_sub AS R
FROM
sud_cat
INNER JOIN video ON video.id_cat = sud_cat.id_sub_cat
WHERE sud_cat.sub_cat = 'Video'
ORDER BY RAND()
LIMIT 3
)
UNION ALL
(
SELECT
sonido.nombre AS S,
sonido.ruta AS R
FROM
sud_cat
INNER JOIN sonido ON sonido.id_cat = sud_cat.id_sub_cat
WHERE sud_cat.sub_cat = 'Fin'
ORDER BY RAND()
LIMIT 3
)
Something that you have to keep in mind is the following, if you can notice in my query I bring only 2 parameters to which I rename as S and R, this is very important, since they have to have the same header so that This can make the query and group it in the number of columns you establish.
The result in my case would be the following:
-- ----------------- Primera consulta ---------------
"Intro_07.mp3" "./assets/archivos/Intro/Intro_07.mp3"
"Intro_08.mp3" "./assets/archivos/Intro/Intro_08.mp3"
"Intro_13.mp3" "./assets/archivos/Intro/Intro_13.mp3"
-- ----------------- Segunda consulta ---------------
"video_16.mp4" "2018-05-12 16:57:03"
"video_21.mp4" "2018-05-12 17:01:29"
"video_12.mp4" "2018-04-19 13:48:22"
-- ----------------- Tercera consulta ---------------
"Fin_09.mp3" "./assets/archivos/Fin/Fin_09.mp3"
"Fin_08.mp3" "./assets/archivos/Fin/Fin_08.mp3"
"Fin_07.mp3" "./assets/archivos/Fin/Fin_07.mp3"