Ordering table and grouping by two columns

Use the FIELD() function to specify the ordering of the estado column.

ORDER BY FIELD(alerta.estado, 'Pendiente', 'Archivado', 'Gestionada'), alerta.fecha