I am working on a project for user administration in ASP.NET Web App (Framework 4.8). In the code have made search box where I want to be able to search for Name,EmployeeNumber and if they are Excluded or not. I use it as a filter so I do not need to scroll through all the pages in the gridview. I have tried some changes in the query but it does not seem to make a difference. I am not so familiar with these kind of SQL queries just so you know.
So I wonder if someone can simply explain to me exactly what is wrong with my query and why?
PopulateGridView:
void PopulateGridView()
{
string find = "select * from TBL_USERS where (Name like '%' @Name '%') or (employee like '%' @Employee '%') and (case when excluded =1 then 'True' else 'False' end like '