I'm not sure about the logic you're trying to achieve but the WHERE clause is false.
where (case
when pname is null then 1
else emp_name
end ) in
(case
when pname is null then 1
else (select emp_name
from employee
where emp_name like '%'||pname||'%')
end );
If you think about the statement, if the pname parameter is null you would basically have a condition like:
1 IN (1)
Also if the pname is not null this would result in peculiar statement.
From what I gather is that if pname is null you want to return each employee row. Otherwise you want to return only the rows having the provided pname. So perhaps something like:
WHERE emp_name LIKE '%'||pname||'%'
OR COALESCE(pname, 'NON-EXISTENT') = 'NON-EXISTENT'