Snippets Collections
select 
  case greatest(col1,col2,col3,col4) 
    when col1 then 'col1:' || col1
    when col2 then 'col2:' || col2
    when col3 then 'col3:' || col3
    when col4 then 'col4:' || col4
    else null
  end as greatestcolumnname
from mytable;

Save snippets that work with our extensions

Available in the Chrome Web Store Get Firefox Add-on Get VS Code extension