made condition on column in view
You can try to move your function call to an OUTER/CROSS APPLY and then use the APPLY result to check your value:

SELECT &lt;your columns&gt;
FROM &lt;your tables&gt;
    CROSS APPLY 
    (
        SELECT dbo.GetFinalLetter(Id, CASE 
        WHEN Id IN (
                ---------
                )
            THEN 1
        WHEN Id IN (
                --------
                )
            THEN 0
        END) as LetterText
    ) AS x
WHERE x.LetterText IS NOT NULL ;


OR you can also use a subquery of the full query:

SELECT &lt;your columns&gt;
FROM 
(
    SELECT &lt;your columns&gt;,
        dbo.GetFinalLetter(Id, CASE 
        WHEN Id IN (
                ---------
                )
            THEN 1
        WHEN Id IN (
                --------
                )
            THEN 0
        END) as LetterText
    FROM &lt;your tables&gt;
) AS t
WHERE LetterText IS NOT NULL ;


The way to do that may depend on the data volume of the tables.

Hope this helps.