Hi Ravi,
Are you trying to have it sort by default — or upon click?
You could sort by case number by doing the sorting within the SOQL query. If you’re looking for a more dynamic sort function.
You could also check out: http://salesforcesource.blogspot.com/2008/11/adding-sorting-capability-to.html
and
http://blog.jeffdouglas.com/2010/07/13/building-a-dynamic-search-page-in-visualforce/
More specifically, take a look at your debug log (I use the developer console) what variable is the null pointer exception on? It could be your SortField or PreviousSortField…
or for that matter it could be the cases being passed to super sort