This value is called moral courage. It happens, for example, in a case of a deliberate action/stand of a person who is fully aware of the risk or possible (negative) consequences, and still does that action or takes that stand. It is a highly nonconformist trait, seen in individuals who place truth or common good above their own interest.