[SPARK-4959] [SQL] Attributes are case sensitive when using a select query from a projection