Попробуйте
where
case when p_parameter ='Y'
then case when Hidden_flag_column = 'Y' then 1 else 0 end
else case when Hidden_flag_column in ('Y','N') then 1 else 0 end
END = 1
Пример с p_parameter = 'Y', а также с 'N' и Hidden_flag_column = 'N'.
select * from dual
where
case when 'N' ='Y'
then case when 'N' = 'Y' then 1 else 0 end
else case when 'N' in ('Y','N') then 1 else 0 end
END = 1
дает 1 строку, а
select * from dual
where
case when 'Y' ='Y'
then case when 'N' = 'Y' then 1 else 0 end
else case when 'N' in ('Y','N') then 1 else 0 end
END = 1
дает 0 строк.