We have two types of martyrdom:

1- The one who dies with a prophet or Imam in the battlefield. Such people have the highest rewards from Allah.

2- The one who dies in the way of Allah, in the obedience of Allah and on the true path. Such people are also martyrs and their sins are forgiven, but their rank is less than the first.

So:
What if someone was killed when oppresser say to leave shia cast and he refuses then oppresser killed that person

There is no doubt that those who are oppressed and killed have a very high rank. But those who die defending the Prophet (s) or Imam (a) have a higher rank. Their rank is unmatched. It may be possible to reach those ranks through exceptional piety, learning knowledge and teaching it, fully submitting to Allah, and avoiding all sins, and sacrificing one’s life if required.