select when length <= 40 then datatype = "char" paren(length) otherwise datatype = "varchar" paren(length) end /*select*/