Ok, here are few pointers!
1. Once a query/ticket is created, you must be saving it somewhere, probably in a database. Make sure while creating it, you have a field CreateDateTime field in DB to track the status.
2. Now, based on this field CreateDateTime, you will pass on the query from one level to other in case not resolved by then.
3. How to pass on? Automatic way could be a 'Windows Service'. It would periodically check the CreateDateTime field value with current DateTime and based on that it will change the level from 1 to 2 or 2 to 3.
Surely, status field would also play a part along with CreateDateTime - in case status is closed then you won't update the level.
Just in case, you need some article to learn on Windows service then:
Simple Windows Service Sample[
^]
Try!