Then if it's unsafe to drive, it is without almost certainty that the court is likely to consider it os untiusfactory quality and not fit for purpose. As such these would be breaches of the Sale of Goods Act 1979 (s.14(2) and 14(3)).
In this case, you would have the right to take the vehicle back and insist on your money back. If they refuse, then you could issue proceedings in the county court for repayment to be made to you. You can do this online at www.moneyclaim.gov.uk.
If the vehicle was less than £10,000 this would be a small claim, and as such, you could do it without legal representation if you wished. However, if more than this, I would strongly encourage you to get a solicitor to deal with it for you as there are significant costs consequences if you get it wrong and you lose.
If this is within the first 6 months of having the car too, then the burden is on the dealer to show the car is not of unsatisfactory quality, i.e. the law helps you out in this period. After that, the burden is on you, but even then, if you get an independent person (qualified engineer) then this should really help and make it difficult for the dealer to say that it is of the right quality and fit for purpose.