I figure you've tried to simplify the question but think you might have over simplified it. Can you provide a little more detail?

Are you asking that if a 'paramter' for c is not provided, then do not check column c in the where?

Typically you need dynamic SQL for this but I think you can do it with someting like this, ssuming 30 is a paramter value and not hardcoded:

select * from XYZ

where a=10 and b=20 and c = case when 30 is null then 30 else c end;