The process of deciding a court case based on the basis of previous decisions is the principle of precedent
That is why it is commonly said that something is unprecedented if it has never occurred before or if it was decided opposite to what was done before.