Look, the first thing you need to do is read the "Before you make a query" thread. It tells you to use code tags to retain the formatting of your code. Failing to do so is being rude to the people from whom you are seeking free help.
It does not enter the default case because i matches one of the cases, namely 3. It is working as it should.
This is three "doubt" posts. You need to read a dam' book, son.