I have the following query
:
select
'preguntas'.'tipo',
'preguntas'.'puntaje',
'preguntas'.'descrip',
'preguntas'.'numero',
'preguntas'.'v_f',
'preguntas'.'seleccion',
'preguntas'.'desarrollo',
CASE 'preguntas'.'tipo'
WHEN 2 THEN (select * from 'preguntas_selecciones' where 'preguntas_selecciones'.'preguntas_id'='preguntas'.'id')
ELSE 0
END as 'respuestas'
from 'preguntas'
where 'preguntas'.'evaluaciones_id' = 6
order by 'preguntas'.'numero' asc;
If I put the result in the THEN
of any value, it gives me the result correctly, but if I add the query
it throws me the following error:
Error Code: 1241. Operand should contain 1 column (s)
Will it be possible to make a query within CASE
?