Build it up as a string collection: each attribute calls a method which appends to a
List<string>
if the associated check is ticked.
When you've assembled them all, use
string.Join[
^] to combine them:
string sql = $"SELECT * FROM MyTable WHERE {string.Join(" AND ", clausesList)}";
The only complication comes if there are "variable values" you need to compare against (
Age = textBoxContent
for example) where you will need to create a paramaters collection and use that as well in your final SqlCommand object.