SELECT
    core_informe.id as Id,
    CASE core_informe.formato_final WHEN 'T' THEN '<i class="fa fa-table fa-fw"></i>' WHEN 'G' THEN '<i class="fa fa-pie-chart fa-fw"></i>' END as Tipo,
    CONCAT('<b>',core_informe.titulo,'</b><br><i>',core_informe.descripcion,'</i>') as 'T&iacute;tulo / Descripcion',
    core_informe.categoria as "Categor&iacute;a",
    (SELECT nombre FROM core_modulos_app WHERE core_informe.modulo=core_modulos_app.id) as Modulo
FROM
    core_informe
WHERE
    id >= 0
    AND 
    (
        "rafael" IN (SELECT desarrolladores FROM core_modulos_app WHERE core_informe.modulo=core_modulos_app.id) 
        OR
        core_informe.modulo=0
        OR
        "rafael" = "admin"
    )