Sql Using Variable In Query Which Filter