ran out of the house and got on a bus ()was going into the town,括号里应该填什么

问题描述:

ran out of the house and got on a bus ()was going into the town,括号里应该填什么
what,which,while,when

which was going into the town 做 a bus的定语那为什么不能是what?