I'll posit (without really proving for now) that this problem is identical to picking four random numbers, with N being one of those numbers, and asking what value for N would make it most likely to be the third number from lowest to highest.

The probability that N is larger than any of the other random numbers is simply N, the probability that N is smaller than any of them is (1-N), and in general the probability that N is larger than P of them and smaller than Q of them is _{(P+Q)}C_{P} N^{P} (1-N)^{Q}. That last part might not be obvious, but you can consider the case posed in the OP: Call the three other random numbers X, Y, and Z, and the probability that N is larger than any two of them and smaller than the other is

[P(N>X)*P(N>Y)*P(N<Z)] + [P(N>X)*P(N<Y)*P(N>Z)] + [P(N<X)*P(N>Y)*P(N>Z)]

= 3 * [N*N*(1-N)]

To find the value of N that will make that probability highest, set the derivative equal to zero.

d/dN [3N^{2}*(1-N)] = d/dN [3N^{2} - 3N^{3}] = 6N - 9N^{2}

Solving 6N - 9N^{2} = 0 gives the solution N = 2/3