Here is where flag is 1 then show record who have flag 1 and flag 0 show record who have flag 0 and nothing to pass in flag then show all value
Declare @flag bit
if(@flag !=0 or @flag !=1 )
begin
SELECT uniquiID,CountryFlag,EventImage,CONVERT(varchar(50), StartDate) as StartDate
,CONVERT(varchar(50), EndDate) as EndDate,EventName,Description,CountryCode,Remark,Flag
FROM TradefairData
end
else
begin
SELECT uniquiID,CountryFlag,EventImage,CONVERT(varchar(50), StartDate) as StartDate
,CONVERT(varchar(50), EndDate) as EndDate,EventName,Description,CountryCode,Remark,Flag
FROM TradefairData where flag=@flage
end