Pathak was replying to a specific question by a media-person on cases related to Muzaffarnagar and other riots in the state.
"Riot cases are also registered under the IPC. If these are politically motivated, we will surely consider their withdrawal," the minister said.
He, however, made it clear that only those cases were being withdrawn which smacked of political vendetta.
"Chief Minister Yogi Adidyanath has decided to withdraw those cases which were filed due to political reasons. We have initiated a process in this regard," he said.
Pathak said the state government had received applications from leaders of all the parties.
"The cases lodged because of political rivalry are being withdrawn by the state government," the minister said.
Over 62 lakh cases were pending before UP courts, he said.
The minister was, however, did not give a specific reply on a news report that the BJP government had initiated the process of withdrawal of 131 cases linked to the 2013 Muzaffarnagar and Shamli communal riots.
At least 62 persons died and a large number of people lost their homes in the riots that took place in September 2013.
Following the violence, a total of 503 cases were lodged against around 1,455 persons at police stations in Muzaffarnagar and Shamli by the then Samajwadi Party government.
Yogi withdrawing Muzaffarnagar riots cases on basis of religion: Congress
The Congress accused Yogi Adityanath of withdrawing cases of heinous crimes such as rioting in Muzaffarnagar on religious lines.
Congress communications in-charge Randeep Surjewala alleged that Adityanath was emulating the British by ruling through the policy of "divide and rule".
"Can cases be withdrawn because I am a Muslim, I am a Sikh, I am a Buddhist, I am a Jain, I am a Hindu, I am a Parsi? Can cases be withdrawn based on which religion do you belong to?" he asked.
"Can cases under heinous offences, can cases of promoting enmity on communal ground, can cases of denigrating each others' religion and consequent riots be withdrawn as political cases is an important question that CM needs to answer," he alleged.
BJP leaders met CM Adityanath on February 5, 2018 and demanded withdrawal of 179 of the 503 cases.
Surjewala said that if Adityanath wanted to review all the cases of riots based on truth, then why only 179 out of 503.
"Why are you selectively picking up only those which are being stated or represented by BJP workers and leaders?" he asked.
Surjewala asked if Adityanath was "scared" that after the Supreme Court ordered fast tracking all criminal cases against political leaders.
"Are they scared that if the cases are put in fast track court, then it will be adversarial for BJP leaders, MLAs and MPs and that is why a quick and hurried decision is being taken, although the CM has only moved and a final call is yet to be taken," he said.
The Congress leader urged Adityanath to learn from the defeat in the Gorakhpur Lok Sabha bypolls, saying he is no longer a BJP leader, but a defender and protector of the Constitution and the law.
"We want to remind him that he has taken oath of India's Constitution that he will protect and uphold the Constitution and the law. Will he do so, is a question that he must answer," he said.
"Divide and rule is the policy being followed by the BJP for they have emulated the British for far too long. Divide and rule and somehow come to power – divide on the basis of religion and retain or attain power, divide on the basis of caste and attain power and make everyone fight with each other," Surjewala said.
He claimed that in western Uttar Pradesh, there have been no riots since 1857 and even during the partition of the country.
There were no riots in this area as Hindus, Muslim, Sikhs, Buddhists and others all stood together in unison to remain in the Indian Union, he said.
They did not want to go with Pakistan, they did not subscribe to the theory of a religion-based country and they rejected it in toto, he said.
Surjewala said it was only in September 2013, that there were riots for the first time in this area after over 100 years in which 62 people died and 503 cases were registered.
If Yogi is communal, who was secular?
'Yogi's national stature is growing despite bypolls setback'
Adityanath shows his real colours
Yogi doesn't view bypoll defeat as referendum on BJP policies
1 year of Yogi's government: Bypoll defeat halts Adityanath's dream run