a true IF...THEN statement would be useful here, but I am not aware of one. I have the user passing in 2 parameters (cfk\_in and senr\_in) into my query, and based on whether the param is Y or N, I will change my query, here is my current query:

```
select a.course_id, a.topic_code
from course_sections a,
 statuses b
where a.course_id = b.course_id
  and term = upper('2010FALL')
  and status = 'P' and pos = 1

```

So this is pretty simple and would give me all sections and topic codes for a particular term. If the user passes in both params as 'N', I would like to just keep it at the above query. If the user passes in cfk\_in = 'Y' and senr\_in = 'N' then I would like to add "and a.topic\_code = 'CFK%'", and like wise if the user passes in cfk\_in = 'N' and senr\_in = 'Y', I would like to add "and a.topic\_code = 'SENR'". I am not allowing them to pass both in as 'Y'.

Is there a way to do this in one query? Thanks for the help.