When you are building the object, you have to create SQL that will work. A where clause that says “empno in (100,200) AND empno - 100” will only be true for those rows where empno equals 100.
There must be something else going on here – you’ll need to give more details about how one can figure out when to multiply a single row’s salary by 2.
I don’t understand why you’d want to hard-code the doubling of a single salary, either. That’s why I thought there must be some unstated requirement / condition.