IN[
^] clause can have a subquery or an expression to check for...
The expression can not be created dynamically, so the only option is to use a subquery...
Create a table variable from your input values and write something like this:
WHERE d.DeptID IN (SELECT fieldToCheck from @temp_table_var)