Pivot the rules and apply in Main table query.
Table_a

Table b (contains column value that will be used and the corresponding value is stored for filter records)

Table C (contains actual data)
Table C should join with the above rule table and filter the records. Also possible to join with tablea.columna and tablea.columnb also as filter from the final table
Rule 1 will be fired and get all the data that contains data with
select rule_id,rule_name,c.* from tablec c where abc in (ab,pq) and pqr in (123);
Rule 2 will have condition
select rule_id,rule_name,c.* from tablec where pqr in (345) and xyz in (abc);
Rule 3 will have condition:
select rule_id,rule_name,c.* from tablec where abc in (zz) ;
Like to have query that only fetch all the data in the final table based on the rule filter driven by column and corresponding values values are in rows multiple or single values possible so in condition can have comma seperated values from the child table.
If no data based on the rule , that rule will not be there in the final data.