# Pastebin 0bGGkYTb ➜ Red git:(master) raku -I. -MRed -e ' model Bla { has $.id is serial; has $.a is column; has $.b is column } red-defaults "SQLite"; Bla.^create-table; my $*RED-DEBUG = True; .say for Bla.^all.map: { .a // .b } ' SQL : SELECT CASE WHEN bla.a IS NULL THEN bla.b ELSE bla.a END as "data_1" FROM bla BIND: []