… is from page 153 of Hayek’s 1976 New South Wales speech “Whither Democracy?”; it appears as chapter 10 of Hayek’s 1978 collection, New Studies in Philosophy, Politics, Economics and the History of Ideas:
But to call ‘law’ everything that the elected representatives of the majority resolve, and to describe as ‘Government under the Law’ all the directives issued by them – however discriminating in favour of, or to the detriment of, some groups of individuals – is a very bad joke. It is in truth lawless government. It is a mere play on words to maintain that, so long as a majority approves of acts of government, the rule of law is preserved.