Código SQL:
Ver originalSELECT telefono, departamento,
servicio,
CASE WHEN servicio='Entrante' THEN E1 ELSE s1 END AS dia1,
CASE WHEN servicio='Entrante' THEN E2 ELSE s2 END AS dia2,
CASE WHEN servicio='Entrante' THEN E3 ELSE s3 END AS dia3,
CASE WHEN servicio='Entrante' THEN E4 ELSE s4 END AS dia4,
CASE WHEN servicio='Entrante' THEN E5 ELSE s5 END AS dia5
FROM tabla
algo asi no funciona???