Most likely you have missed parenthesis and the BETWEEN keyword. Try something like:
string query = "Select * from Products where (ProductID in ('" + Request.QueryString["ID"].ToString().Substring(1) +"') AND UnitCost < 5000) or (ProductID in ('" + Request.QueryString["ID"].ToString().Substring(1) +"') AND UnitCost BETWEEN 5000 and 10000)";