The idiom "cat on the wall" refers to someone who is indecisive or unwilling to commit to a particular choice. Similar to the saying "sitting on the fence," it suggests that such a person is unpredictable or opportunistic, refusing to take a stand. The idiom draws from the imagery of a cat perched on a wall, uncertain about which side to jump down to.

During the raging Mahabharata war, Krishna noticed a warrior entering the battlefield. The warrior's direct gaze, courageous demeanor, and heroic stride caught Krishna's attention. Changing his appearance, Krishna approached the man and asked, "O Warrior, what brings you here?"

The warrior replied, "I have come to participate in the war."

Krishna challenged him: "What is your special ability?"

Displaying his bow and three arrows, the warrior said, "I can eliminate all the Kauravas with one arrow, all the Pandavas with the second, and even you, Krishna, with the third."

"How am I to believe you?" Krishna questioned.

The warrior aimed at a distant tree and declared, "I can fell all its leaves with a single arrow."

Intrigued, Krishna prompted him to demonstrate his skill. Being divine, Krishna secretly hid five leaves under his foot. The warrior then released his arrow, which pierced not only all the leaves on the tree but also struck Krishna's foot five times. Recognizing Krishna's divinity, the warrior paid his respects.

As for justice, Krishna confronted the warrior about his neutrality: "For whom do you intend to fight?"

The warrior answered, "As a challenge to my skill, I will support and fight for whichever side starts to lose the upper hand."

Krishna foresaw that this would perpetuate the war without end. "O Warrior, it seems you need guidance from me," Krishna said. The warrior nodded in agreement. "There is someone whose death can influence the outcome of this war. I need his head."

Upon asking who this might be, Krishna replied, "O Warrior, the person who views this war as merely a challenge to his skills, rather than fighting for a just cause, is you." Implicitly, Krishna was asking for the warrior's head.

The warrior immediately agreed, yielding his head to Krishna. As a reward for his devotion, Krishna granted him a boon: "Even though you will die, you will be able to witness the Mahabharata war with your own eyes." Krishna then took his head.

In matters of justice, people who remain neutral or indecisive—much like a "cat on the wall"—often act out of selfish motives. Despite their abilities, they ultimately prove unhelpful to anyone.