You do sum types in SQL the same way you do everything else. You create more tables, and add relationships.
A sum type is a disjoint union so a straightforward encoding of A+B would be (tag:bool, A?, B?) in made-up syntax. When tag==0 then A is present When tag==1 then B is present
On a different level, the fact that a column can be NULL itself can be considered a sum, like A? = A + {NULL}.