Can you put this (subquery)
select count(ID_NO) as TotalCount from table1
where currentstepname in ('EV','IV')
group by ID_NO having count(ID_NO)>1
into a temp table ? - not sure of the exact syntax because it depends on which DB you are using, but something like
create temp table multi_IDNOs as select ID_NO, count(ID_NO) as TotalCount from table1
where currentstepname in ('EV','IV')
group by ID_NO having count(ID_NO)>1
then your query becomes (I think)
select ID_NO, currentstepname from table
where ID_NO in (select ID_NO from multi_IDNOs) and currentstepname = "EV"
union
select ID_NO, currentstepname from table
where ID_NO Not in (Select ID_No from multi_IDNOs)
The original way I thought about this with the subquery, is likely bad performance-wise, if you can do it without it may be nicer
caveat - my SQL is as rusty as, so, use it for guidance/ideas