No. Table-Valued Functions -- Multi-statement TVF, Inline TVF, or SQLCLR TVF -- need to return a consistent / deterministic result set. This is similar to Scalar UDFs (T-SQL and SQLCLR) needing to always return the same datatype.
In fact, the result set to be returned by any TVF, regardless of the type of TVF, is defined in the system meta-data when the TVF is created, and cannot be changed at run-time. You can see the definitions using the following query:
SELECT so.type_desc AS [ObjectType], so.[name] AS [ObjectName], sc.*
FROM sys.columns sc
INNER JOIN sys.objects so
ON so.[object_id] = sc.[object_id]
WHERE so.type_desc NOT IN ('SYSTEM_TABLE', 'USER_TABLE', 'INTERNAL_TABLE',
'VIEW', 'TYPE_TABLE')
ORDER BY so.[type_desc], so.[name], sc.column_id;
For ObjectType, you can get back entries having the following values:
- CLR_TABLE_VALUED_FUNCTION
- SQL_INLINE_TABLE_VALUED_FUNCTION
- SQL_TABLE_VALUED_FUNCTION