Hi PRA,
Refer below Sample query.
SQL
DECLARE @Table AS TABLE(Id INT,Name VARCHAR(50),IdPerson INT,IdPersonOne INT,IdPersonTwo INT)
INSERT INTO @Table VALUES(1,'Pulodov Rustam',1,2,3)
INSERT INTO @Table VALUES(2,'Soliev Firuzjon',6,5,4)
INSERT INTO @Table VALUES(3,'Asrori Yatim',7,8,9)
DECLARE @Value INT
SET @Value = 1
SELECT Name
FROM @TABLE
WHERE (IdPerson = @Value OR @Value IS NULL)
OR(IdPersonOne = @Value OR @Value IS NULL)
OR(IdPersonTwo = @Value OR @Value IS NULL)
Output