CASE WHEN gestion_tipo IS NOT NULL AND gestion_tipo NOT LIKE '' THEN 1 ELSE 0 END FLG_GESTION_VPCONNECT,
         CASE WHEN gestion_tipo IS NOT NULL AND gestion_tipo NOT LIKE '' AND gestion_tipo NOT LIKE '%Sin Contacto%' THEN 1 ELSE 0 END FLG_CE_VPCONNECT,
         CASE WHEN gestion_tipo LIKE '%Acepta%' AND gestion_tipo NOT LIKE '%No%' AND gestion_tipo NOT LIKE '%Visita%' THEN 1 ELSE 0 END FLG_ACEPTA_VPCONNECT,
         CASE WHEN gestion_tipo LIKE '%Acepta%' AND gestion_tipo LIKE '%No%' THEN 1 ELSE 0 END FLG_NO_ACEPTA_VPCONNECT,
         CASE WHEN gestion_tipo LIKE '%Lo Pensa%' THEN 1 ELSE 0 END FLG_LO_PENSARA_VPCONNECT    ,
         CASE WHEN gestion_tipo = 'No Califica' THEN 1 ELSE 0 END FLG_NO_CALIFICA_VPCONNECT,
         CASE WHEN gestion_tipo LIKE '%Desisti%' THEN 1 ELSE 0 END FLG_DEISTE_VPCONNECT,

Add a code snippet to your website: www.paste.org