how to avoid duplicate record with certain conditon
A possible solution based on set operations. From my understanding you have to display all rows that contain a 'ticket' in the status fields and all rows with an 'import' in the status field where there is not a similar row with a 'ticket' in the status field.


select id,name,testfield,status  
from mytable
where status='ticket'
union 
select id,name,testfield,status
from mytable where
(id,name) in 
((select id,name
from mytable
where status='import'
)
minus
(select id,name
from mytable
where status='ticket'
)) ;


But sqlfiddle does not like it. 
It says


  Oops! Something went wrong. Try it again [...]