I am using a view like below one:
CREATE VIEW [dbo].[VIEW_Test] AS SELECT *, [dbo].[fn_Status](id) as ML FROM X
Sql Func