Custom Sort for Table Group By

Currently when grouping a table by a column there are sort options of ascending or descending. I would like to be able to define a custom sort order.