I am trying to reorder a Pivot in Confluence which is from a Filter in Jira. Pivot looks good but I'd like the column order to be defined by the Status column:
Backlog, Analysing, Ready for Release, Closed
I've wrapped my pivot in the ‘Table Transformer’ Macro but I can't get the SQL right, please can anyone advise please?

SQL code:
SELECT T* ORDER BY COLUMN.status CASE WHEN COLUMN.status LIKE 'Backlog' THEN 1 WHEN COLUMN.status LIKE 'Analysing' THEN 2 WHEN COLUMN.status LIKE 'Ready for Release' THEN 3 WHEN COLUMN.status LIKE 'Closed' THEN 4 ELSE COLUMN.status END ASC