I've never seen a potentiometer with 4 connections except via google for those with wiper connections doubled up ( in which case I'd guess 2-4 would always be 0k) do you have a picture ?
pin 4 is the centre tap - centre-tap pots allow a differential output without needing external voltagedivider - saves components and board area, or allows injecting a virtual ground into the pot so notrimming needed.
It may be a 'sine' pot with three inter-connected windings. The centre connection point may be the common or wiper connection. The wiper then tracks around a circular resistance which has three fixed connection points around its periphery. The resistance measured between the common point and the other three connections then defines where the wiper is in respect to the X-Y plane.
As Mark suggests, the fourth pin is the centre tap, so wire the end terminals (pins 1 and 3) to 5 V and ground, the wiper (pin 2) and centre tap (pin 4) to two Analog inputs. You then successively read the wiper and centre tap voltages, and if they differ significantly, act accordingly.