Billy McKay scored the winner as Inverness defeated Ross County 2-1 at the Global Energy Stadium to win an entertaining Highland derby.