Skyhawk 172/Cutlass 172
Flight Crew Instrument; Flight Crew Private
Flight Crew Last 90 Days 57; Flight Crew Total 209; Flight Crew Type 193
Communication Breakdown; Other / Unknown; Situational Awareness; Time Pressure
ATC Issue All Types; Conflict NMAC; Deviation - Altitude Excursion From Assigned Altitude; Deviation / Discrepancy - Procedural Clearance; Deviation / Discrepancy - Procedural Published Material / Policy
Flight Crew Took Evasive Action
Procedure; Environment - Non Weather Related; Human Factors
While on an IFR flight plan to ZZZ; I had a near midair collision; NMAC; with another aircraft not talking with ATC and had to immediately take evasive action to avoid the other aircraft by climbing.The other aircraft was less than a half-mile away; closing within 50 degrees of a head-on collision and level at our assigned altitude of 3;000 feet MSL. The other aircraft flew directly under us within 200-300 feet from what we could tell and took no action to maneuver away from us. ATC had given us a Traffic Advisory call; saying; 'Traffic; 2;700 feet and at your 1 o'clock; northbound; unknown type.' I could see them on ADS-B In and saw that they were actually in a slight climb and then leveled off at 3;000 about 10 seconds after the traffic call-out. ADS-B In showed 0 feet vertical separation. Because of this; I was vigilantly staring at my 12 to 1 o'clock looking for them. [I] saw them closing towards us and in less than a second; I pulled up and gained 300 feet Less than 2 seconds later; they passed directly under us.After ensuring they were no longer a factor; I began correcting our altitude back down to our assigned altitude of 3;000 feet and called ATC to let them know we had a NMAC. He said; 'I showed that traffic at 2;700 feet' again and didn't ask anything more about the situation. I feel like ATC should have done more to separate us and given us a vector away from the closing traffic. Yes; at that moment; we were in VMC and were able to avoid at the last moment; but we had just emerged from the clouds and only saw the traffic as we got around the corner of another cloud. If we had reacted seconds later; I feel [that] we would've collided.
C172 Pilot reported a NMAC and states that ATC could have done more in the way of separation.