Supermarket chain Lidl has won a High Court battle over plans to open its first-ever pub in Northern Ireland.