Select case TipoLinea when 'C' then case when Importe>0 then 'Diferido' else 'Contado' end else 'Indiferente' end as Tipo from LineaVenta