EDIT:
The circuit shown below reflects the complete redesign of the earlier circuit, which resolves issues found when simulating the earlier design, gets rid of the regulator, and incorporates a suggestion made by the OP, Vishal.
THREE PHASE FEED:
With three phase feed, there'll be 230 volts across NEUT and L2 and, through K1's normally closed contact, across the load and the primary of T1.
With 230 volts into T1's primary, the voltage at U1A- will be more positive than the voltage on U1A+, and U1A's output will be low.
U1B is a timer which is used to keep K1 de-energized as the circuit powers up, and with U1A OUT low, C3 will be shorted to ground through D4 and U2B's open collector output. Q1 will be turned OFF, and the relay won't be energized.
R4 and R5 are a voltage divider halving the 6.2 volt reference from D3, and with 3.1 volts on U1B- and about 1 volt on U1B+, U2B OUT will be low, which will short R8 to ground, turning Q1 OFF.
With Q1 off, current can't flow through K1's coil, so the relay will remain in its de-energized state, with COM connected TO NC.
SINGLE PHASE FEED:
With single phase feed, the voltage across NEUT and L2 will drop to about 130 volts, which will cause the voltage at U1A- to be less positive than the voltage on U1A+. That'll cause U1A OUT to go open collector, and C3 will start charging up to the DC supply's positive rail through R6 and R7.
Initially, C3 and U1B+ will be at zero volts and U1B- will be sitting at 3.1 volts, so U1B OUT will be low.
As C3 charges, however, it'll eventually drive U1B+ more and more positive, and when it gets a tiny bit more positive than the 3.1 volts on U2-, U1B OUT will go open collector, diverting the current through R8 from ground into Q1's base, quickly turning K1 ON.
With K1 on, COM will disconnect from NC and will connect to NO, disconnecting the load from NEUTRAL and connecting it across L1 and L2, where it'll be connected across 230 volts.
I've simulated the circuit and it seems to work nicely, and I've posted the LTspice circuit list after the graphic so you can play with the circuit if you want to. Enjoy! :)
If you don't have LTspice it's available, free, here.
Version 4
SHEET 1 2276 2100
WIRE 1744 272 -32 272
WIRE 1872 272 1824 272
WIRE 2048 272 1872 272
WIRE -32 352 -32 272
WIRE 16 352 -32 352
WIRE 128 352 96 352
WIRE 224 352 128 352
WIRE 528 352 304 352
WIRE 1808 352 1808 320
WIRE 240 400 192 400
WIRE 1760 400 1760 320
WIRE 1920 400 1760 400
WIRE 288 448 288 400
WIRE -32 512 -32 352
WIRE 16 512 -32 512
WIRE 112 512 96 512
WIRE 384 512 112 512
WIRE 528 512 528 352
WIRE 528 512 464 512
WIRE 1744 512 528 512
WIRE 1872 512 1872 272
WIRE 1872 512 1824 512
WIRE 2048 528 2048 272
WIRE 400 560 352 560
WIRE 448 608 448 560
WIRE 1808 608 1808 560
WIRE 1920 608 1920 400
WIRE 1920 608 1808 608
WIRE -32 736 -32 512
WIRE 16 736 -32 736
WIRE 128 736 96 736
WIRE 224 736 128 736
WIRE 528 736 304 736
WIRE 192 784 192 400
WIRE 240 784 192 784
WIRE 288 832 288 784
WIRE -32 912 -32 736
WIRE 16 912 -32 912
WIRE 128 912 96 912
WIRE 384 912 128 912
WIRE 528 912 528 736
WIRE 528 912 464 912
WIRE 560 912 528 912
WIRE 2048 912 2048 608
WIRE 2048 912 560 912
WIRE 352 960 352 560
WIRE 400 960 352 960
WIRE 560 976 560 912
WIRE 448 1024 448 960
WIRE 192 1072 192 784
WIRE 352 1072 352 960
WIRE 752 1104 640 1104
WIRE 864 1104 816 1104
WIRE 944 1104 864 1104
WIRE 1056 1104 944 1104
WIRE 1184 1104 1056 1104
WIRE 1264 1104 1184 1104
WIRE 1520 1104 1264 1104
WIRE 1616 1104 1520 1104
WIRE 1760 1104 1760 560
WIRE 1760 1104 1616 1104
WIRE 944 1136 944 1104
WIRE 1056 1136 1056 1104
WIRE 1264 1136 1264 1104
WIRE 560 1152 560 1056
WIRE 1760 1184 1760 1104
WIRE 192 1200 192 1152
WIRE 352 1200 352 1152
WIRE 640 1200 640 1184
WIRE 720 1200 640 1200
WIRE 640 1216 640 1200
WIRE 1616 1216 1616 1104
WIRE 1184 1232 1184 1104
WIRE 944 1248 944 1216
WIRE 1152 1248 944 1248
WIRE 1264 1264 1264 1216
WIRE 1264 1264 1216 1264
WIRE 1296 1264 1264 1264
WIRE 1328 1264 1296 1264
WIRE 1440 1264 1408 1264
WIRE 1056 1280 1056 1216
WIRE 1152 1280 1056 1280
WIRE 592 1296 592 1104
WIRE 608 1296 608 1104
WIRE 752 1296 640 1296
WIRE 864 1296 864 1104
WIRE 864 1296 816 1296
WIRE 1760 1328 1760 1264
WIRE 1920 1328 1920 608
WIRE 1920 1328 1760 1328
WIRE 1296 1344 1296 1264
WIRE 1328 1344 1296 1344
WIRE 1440 1344 1440 1264
WIRE 1440 1344 1392 1344
WIRE 1760 1360 1760 1328
WIRE 1520 1376 1520 1104
WIRE 864 1392 864 1296
WIRE 944 1392 944 1248
WIRE 1056 1392 1056 1280
WIRE 1088 1392 1056 1392
WIRE 1248 1392 1168 1392
WIRE 1488 1392 1248 1392
WIRE -32 1408 -32 912
WIRE 32 1408 -32 1408
WIRE 560 1408 560 1232
WIRE 560 1408 32 1408
WIRE 592 1408 560 1408
WIRE 720 1408 720 1200
WIRE 720 1408 672 1408
WIRE 1616 1408 1616 1296
WIRE 1616 1408 1552 1408
WIRE 1696 1408 1616 1408
WIRE 1440 1424 1440 1344
WIRE 1488 1424 1440 1424
WIRE 1248 1440 1248 1392
WIRE 1056 1456 1056 1392
WIRE 1440 1456 1440 1424
WIRE 720 1552 720 1408
WIRE 864 1552 864 1456
WIRE 864 1552 720 1552
WIRE 944 1552 944 1472
WIRE 944 1552 864 1552
WIRE 1056 1552 1056 1520
WIRE 1056 1552 944 1552
WIRE 1184 1552 1184 1296
WIRE 1184 1552 1056 1552
WIRE 1248 1552 1248 1520
WIRE 1248 1552 1184 1552
WIRE 1440 1552 1440 1520
WIRE 1440 1552 1248 1552
WIRE 1520 1552 1520 1440
WIRE 1520 1552 1440 1552
WIRE 1760 1552 1760 1456
WIRE 1760 1552 1520 1552
WIRE 720 1648 720 1552
FLAG 720 1648 0
FLAG 128 912 L2325
FLAG 112 512 L1325
FLAG 32 1408 NEUT
FLAG 1808 352 0
FLAG 128 352 L1184
FLAG 128 736 L2184
FLAG 288 448 0
FLAG 448 608 0
FLAG 288 832 0
FLAG 448 1024 0
FLAG 192 1200 0
FLAG 352 1200 0
SYMBOL ind2 544 1136 R0
WINDOW 0 -29 40 Left 2
WINDOW 3 -33 65 Left 2
SYMATTR InstName L1
SYMATTR Value 17
SYMATTR Type ind
SYMBOL ind2 656 1088 M0
WINDOW 0 -40 48 Left 2
WINDOW 3 -49 77 Left 2
SYMATTR InstName L2
SYMATTR Value 50m
SYMATTR Type ind
SYMBOL ind2 656 1200 M0
WINDOW 0 -37 42 Left 2
WINDOW 3 -47 70 Left 2
SYMATTR InstName L3
SYMATTR Value 50m
SYMATTR Type ind
SYMBOL schottky 752 1120 R270
WINDOW 0 32 32 VTop 2
WINDOW 3 0 32 VBottom 2
SYMATTR InstName D1
SYMATTR Value 1N5818
SYMATTR Description Diode
SYMATTR Type diode
SYMBOL polcap 848 1392 R0
WINDOW 0 -39 36 Left 2
WINDOW 3 -54 62 Left 2
SYMATTR InstName C1
SYMATTR Value 1000µ
SYMBOL res 928 1120 R0
WINDOW 0 47 46 Left 2
WINDOW 3 41 77 Left 2
SYMATTR InstName R3
SYMATTR Value 12k
SYMBOL res 928 1376 R0
WINDOW 0 50 41 Left 2
WINDOW 3 43 70 Left 2
SYMATTR InstName R4
SYMATTR Value 10k
SYMBOL schottky 752 1312 R270
WINDOW 0 32 32 VTop 2
WINDOW 3 0 32 VBottom 2
SYMATTR InstName D2
SYMATTR Value 1N5818
SYMATTR Description Diode
SYMATTR Type diode
SYMBOL res 1600 1200 R0
WINDOW 0 -44 27 Left 2
WINDOW 3 -60 57 Left 2
SYMATTR InstName R5
SYMATTR Value 4700
SYMBOL npn 1696 1360 R0
SYMATTR InstName Q1
SYMATTR Value 2N2222
SYMBOL res 1776 1280 R180
WINDOW 0 36 76 Left 2
WINDOW 3 36 40 Left 2
SYMATTR InstName R6
SYMATTR Value 160
SYMBOL Comparators\\LT1017 1184 1264 R0
SYMATTR InstName U1
SYMBOL res 1040 1120 R0
SYMATTR InstName R2
SYMATTR Value 1200
SYMBOL zener 1072 1520 R180
WINDOW 0 -39 36 Left 2
WINDOW 3 -105 -1 Left 2
SYMATTR InstName D3
SYMATTR Value EDZV6_2B
SYMBOL Comparators\\LT1017 1520 1408 R0
SYMATTR InstName U2
SYMBOL res 1248 1120 R0
WINDOW 0 40 48 Left 2
WINDOW 3 37 82 Left 2
SYMATTR InstName R7
SYMATTR Value 10k
SYMBOL cap 1424 1456 R0
SYMATTR InstName C3
SYMATTR Value 100n
SYMBOL res 1424 1248 R90
WINDOW 0 -33 58 VBottom 2
WINDOW 3 -28 61 VTop 2
SYMATTR InstName R8
SYMATTR Value 1meg
SYMBOL diode 1392 1328 R90
WINDOW 0 0 32 VBottom 2
WINDOW 3 32 32 VTop 2
SYMATTR InstName D4
SYMATTR Value 1N4148
SYMBOL res 1184 1376 R90
WINDOW 0 0 56 VBottom 2
WINDOW 3 32 56 VTop 2
SYMATTR InstName R9
SYMATTR Value 10k
SYMBOL res 1232 1424 R0
SYMATTR InstName R10
SYMATTR Value 10k
SYMBOL Misc\\signal 112 512 R90
WINDOW 3 24 104 Invisible 2
WINDOW 123 0 0 Left 2
WINDOW 39 0 0 Left 2
WINDOW 0 52 27 VRight 2
SYMATTR Value SINE(0 325 50 0 0 120)
SYMATTR InstName V325A
SYMBOL Misc\\signal 112 912 R90
WINDOW 3 24 104 Invisible 2
WINDOW 123 0 0 Left 2
WINDOW 39 0 0 Left 2
WINDOW 0 52 26 VRight 2
SYMATTR Value SINE(0 325 50 0 0 240)
SYMATTR InstName V325B
SYMBOL Misc\\signal 112 352 R90
WINDOW 3 24 104 Invisible 2
WINDOW 123 0 0 Left 2
WINDOW 39 0 0 Left 2
WINDOW 0 58 22 VRight 2
SYMATTR Value SINE(0 184 50 0 0 120)
SYMATTR InstName V184A
SYMBOL Misc\\signal 112 736 R90
WINDOW 3 24 104 Invisible 2
WINDOW 123 0 0 Left 2
WINDOW 39 0 0 Left 2
WINDOW 0 60 22 VRight 2
SYMATTR Value SINE(0 184 50 0 0 240)
SYMATTR InstName V184B
SYMBOL res 688 1392 R90
WINDOW 0 0 56 VBottom 2
WINDOW 3 32 56 VTop 2
SYMATTR InstName R1
SYMATTR Value 1G
SYMBOL sw 1840 272 M270
WINDOW 0 21 189 VLeft 2
WINDOW 3 52 172 VLeft 2
SYMATTR InstName S325NC
SYMBOL res 2064 624 R180
WINDOW 0 36 76 Left 2
WINDOW 3 36 40 Left 2
SYMATTR InstName R11
SYMATTR Value 100
SYMBOL sw 1840 512 M270
WINDOW 0 20 188 VLeft 2
WINDOW 3 50 168 VLeft 2
SYMATTR InstName S325NO
SYMBOL res 544 960 R0
SYMATTR InstName R12
SYMATTR Value 1
SYMBOL sw 320 352 M270
WINDOW 0 -27 12 VLeft 2
WINDOW 3 26 15 VLeft 2
SYMATTR InstName S3
SYMBOL sw 480 512 M270
WINDOW 0 -27 12 VLeft 2
WINDOW 3 26 15 VLeft 2
SYMATTR InstName S4
SYMBOL sw 320 736 M270
WINDOW 0 -27 12 VLeft 2
WINDOW 3 26 15 VLeft 2
SYMATTR InstName S5
SYMBOL sw 480 912 M270
WINDOW 0 -27 12 VLeft 2
WINDOW 3 26 15 VLeft 2
SYMATTR InstName S6
SYMBOL voltage 192 1056 R0
WINDOW 3 24 96 Invisible 2
WINDOW 123 0 0 Left 2
WINDOW 39 0 0 Left 2
SYMATTR InstName V5
SYMATTR Value PULSE(0 1 1 1m 1m 1)
SYMBOL voltage 352 1056 R0
WINDOW 3 24 96 Invisible 2
WINDOW 123 0 0 Left 2
WINDOW 39 0 0 Left 2
SYMATTR InstName V6
SYMATTR Value PULSE(0 1 5 1m 1m 1)
TEXT 744 1632 Left 2 !K L1 L2 L3 1
TEXT 736 1576 Left 2 !.tran 10 startup uic
TEXT 736 1600 Left 2 !.model SW SW(Ron=.01 Roff=1G Vt=0.5 Vh=0)
TEXT 1776 1256 Left 2 ;RELAY COIL
TEXT 1776 1288 Left 2 ;RESISTANCE
TEXT 592 1080 Left 2 ;T1
TEXT 352 1472 Left 2 ;R1 AND R12 ARE FOR SIM ONLY