SQL Conditional Column Existence
Can I somehow select a column if exists in a view, but ignore the column if it does not exist?

    SELECT
    	CASE
    		WHEN EXISTS(SELECT 1 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'MyView' AND COLUMN_NAME = 'MyColumn')
    			THEN MyView.MyColumn
    		ELSE NULL
    	END AS [Sometimes]
    FROM
    	MyView

Right now, that returns a "Msg 207 Invalid column name" error.

Perhaps some option to ignore that error is possible?

SQL Conditional Column Existence
===

Can I somehow select a column if exists in a view, but ignore the column if it does not exist?

    SELECT
    	CASE
    		WHEN EXISTS(SELECT 1 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'MyView' AND COLUMN_NAME = 'MyColumn')
    			THEN MyView.MyColumn
    		ELSE NULL
    	END AS [Sometimes]
    FROM
    	MyView

Right now, that returns a "Msg 207 Invalid column name" error.

Perhaps some option to ignore that error is possible?
