Bangalore rental aggrement problems

I live in bangalore. I had a rental aggrement with the landlord and as per the aggrement I have given the 3 months advance notice for vacating the house. Now the landlord on some pretex is refusing to return the advance amount (Which is 10 times the rent). The house doesn't have an Occupation certificate, so does that make the rental agreement also illegal? I have given him notice in the December 2014 that I am vacating in 3 months, however we also have mutually agreed that I extend the notice period by 1 more month, i.e., it ends in the month of march 2015. There are very small minor changes that I made in the house which only includes putting holes in the wall to hang photo frames and also to wall mount TV (There are a total of around 20 nails that I have put on the wall in the entire house). When I informed him in December 2014 that I will vacate in 3 months, he said it is not possible. The agreement however says that either party can issue a 3 months notice for vacating the house. I also informed him that I will paint the house as per the agreement before vacating the house including closing of the nail holes that I made. Also according to him, he wants to deduct the damages caused by me (which is putting 20 nails on the walls of the house). I clearly know that he has no intention of returning my advance amount back or will return only a small fraction of the amount. I wrote a letter to him on mid feb will all the above time line information and asked him to return the amount back to me on the end of march. He wrote a mail back to me saying that my notice period starts from mid feb and he will cut the 3 months rent from the advance amount before giving me back if he has to return it in the end of march. I have a copy of all the SMS (including notice sent by me in December), which I know is valid in court. Also he threatens me with SMS statements saying that "you will get your money even after my death also" etc. He also starts troubling me saying that he will return the advance amount once he gets the next tenant / asks me to search for the next tenant for him. He also asks me to stay in house 24*7 to show the house to the next tenant. I am currently employed, and it is not possible to stay in house all the time to show it to his perspective tenants. And there is also no such clause in the rental agreement. I have showed the house to people if they come during the time I stay at home. I have satisfied all the rules of the rental agreement, however as you can see, my landlord doesnt have any intention of giving me my full money back. Can this be challenged in consumer court? If it goes to civil court, how long does it typically take for the case to be solved / for me to get my money?