The victims were returning after attending a court hearing on their motorcycle when they were stopped by eight persons waiting in a car. They hit them with sharp-edged weapons, DSP Balbir Singh Bajwa said.
The NCC officials from the academy rushed to rescue them, he said.
The trio was identified as Amandeep Singh of Awankot village near Ghanauli, Jasbir Singh and Narinder Singh.
Both groups are said to be from rival gangs. They had clashed in Ghanauli two years back, police added.