Best method of creating constant value
Scalar UDFs don't have to kill performance when they return a constant value. You can save off the function value to a local variable or parameter and use that variable in your query

CREATE FUNCTION dbo.RETURN_SPECIAL_VALUE() RETURNS INT
AS
BEGIN
    RETURN 1;
END;

GO

DECLARE @special_value INT = dbo.RETURN_SPECIAL_VALUE();

-- example query that uses special value
SELECT TOP (5) @special_value, number
FROM master..spt_values;


On the other hand, if the constant is used in the WHERE clause the estimates may be better using the literal. Unless an OPTION (RECOMPILE) is used, which may be excessive.