You just need to add one more column to your table, and perhaps call it "level" (TINYINT, 1). I think you will have an easier time managing the category level that way.
For example, the "level" would be 0 for Winter Olympics, 1 for Skiing, 2 for Slalom, and 2 for Downhill. With those two pieces of information, it is possible to print the well-formed list, as in your example.
I have done something almost exactly like this and as I recall, I used a muti-dimensional array to sort out the result set. You could loop through the mysql_fetch_array() resultant array and create a new array that has your categories stored hierarchically.
If you use a "for" loop, and inside it nest a "foreach" loop (foreach of your MySQL result set rows), you can do something like this:
"Check the category level; if it's equal to $i, and $i is 0, create a new sub-array that is zero levels deep."
You could continue this pattern, looping through your query result and assigning each category to a "tier" of your new array. You will, of course, need to be familiar with arrays, and more specifically, keys, indeces, and manipulating them.