Você pode escrever o
where
cláusula como:where (case when (:stateCode = '') then (1)
when (:stateCode != '') and (vw.state_cd in (:stateCode)) then 1
else 0)
end) = 1;
Como alternativa, remova o
case
inteiramente:where (:stateCode = '') or
((:stateCode != '') and vw.state_cd in (:stateCode));
Ou, melhor ainda:
where (:stateCode = '') or vw.state_cd in (:stateCode)