Oxidation numbers [duplicate]

An element have many oxidation numbers, then which one should we consider in the given question?

e.g. In the compound $\ce{HCN}$ as $\ce{C}$ {carbon} has +4,+2,-4 oxidation numbers and $\ce{N}$ {nitrogen} has -5,+4,+3,+2,+1,-3,-2 oxidation numbers