I wonder if there is any wise way to rewrite the following query so that the indexes on columns get used by optimizer?
Yes - careful use of dynamic sql will solve this problem. There are two ways to do it:
If you are a "purist" about stored procs, then compose a custom query string inside a stored proc and execute the string. The specific query then can be dynamically written per execution to include only the relevant criteria.
If you are flexible about the location of this SQL, you can (again CAREFULLY) compose the query string in your application and pass it to the server.
The danger, of course, is around SQL injection. So you have to be very careful how the data is passed from client into the dynamic sql statement.
Really thorough and comprehensive articles from Erland Sommarskog: