codice:
select *,if(indice = '',titolo,indice) as ordine
from test
order by ordine asc