It seems that you already have an answer, which can be adjusted if required: https://learn.microsoft.com/en-us/answers/questions/137723/execute-sp-whose-input-parameter-value-is-coming-f.html. You can also adjust the invoked stored procedures to deal with empty and null parameters. The SelectionBIT column can be filtered by cursor and does not have to be passed to procedures.
But if you are actually on redesign phase, maybe you need something like this:
declare @DATATABLE as table
(
CountryID INT,
IID VARCHAR(10),
PROD VARCHAR (50),
Description VARCHAR (250),
CLAS INT
)
INSERT @DATATABLE
SELECT 12,'IM','S350A','LCKNG NAT',04 UNION ALL
SELECT 45,'RD','16M120','FLAT WASHER',04 UNION ALL
SELECT 12,'IM','A14751','CNCTR2.5MM',01 UNION ALL
SELECT 12,'IM','X15129','OIL LEVEL',01 UNION ALL
SELECT 69,'XY','5VB554','SOLID',14 UNION ALL
SELECT 71,'NS','1Q5128','EVELLI',14 UNION ALL
SELECT 71,'YT','PM2001','MINI31',01
declare @DRIVERTABLE as table
(
SP_Name VARCHAR(50),
PROD VARCHAR(50),
CountryID INT,
CLAS VARCHAR(30),
SelectionBIT INT
)
INSERT @DRIVERTABLE
SELECT 'usp_testprod','','12','04,01','1' union all
SELECT 'usp_testprod','','12','04' ,'0' union all
SELECT 'usp_testprod','','12','09' ,'0' union all
SELECT 'usp_testprod','','31','04' ,'0' union all
SELECT 'usp_testcust','A14751','65','','1' union all
SELECT 'usp_testcust','PM2001','39','','0'
SELECT * FROM @DATATABLE
SELECT * FROM @DRIVERTABLE
---
select distinct d.*
from @DATATABLE as d
cross join @DRIVERTABLE as f
where f.SelectionBIT = 1
and (nullif(f.CountryID, 0) is null or d.CountryID = f.CountryID)
and (nullif(f.PROD, '') is null or d.PROD in (select ltrim(value) from STRING_SPLIT(f.PROD, ',')))
and (nullif(f.CLAS, '') is null or d.CLAS in (select ltrim(value) from STRING_SPLIT(f.CLAS, ',')))
This does not require separate stored procedures and it gives a single output.