Authorize upon appeal in specific cases such variance from the terms of the ordinance as will not be contrary to the public interest, where, owing to special conditions, a literal enforcement of the provisions of the ordinance will result in unnecessary hardship and so that the spirit of the ordinance shall be observed and substantial justice done.