I'm trying to return data from different columns depending type defined for the data:SELECT dbo.Property.PropertyName, dbo.Datatype.TypeName, CASE dbo.Datatype.TypeName WHEN 'Integer' THEN [Integer] WHEN 'Float' THEN [Float] WHEN 'Date' THEN [Date] WHEN 'Text' THEN [Text] ELSE 'Unknown Datatype' END AS ValueFROM dbo.Property INNER JOIN dbo.Datatype ON dbo.Property.DatatypeID = dbo.Datatype.ID INNER JOIN dbo.RowValue ON dbo.Property.ID = dbo.RowValue.PropertyID
I got error message "Error converting data type varchar to float."Is it possibble to return data from conditional column?