I've added a geography column to my table (MICROSOFT SQL SERVER) and inserted geography point data in it (4326). Now I am able to compute distance of all points from a specific point using below query:
DECLARE @X geography = geography::Point(0, 0 , 4326);
SELECT TOP(4) *, LOCATION.STDistance(@
FROM [ADDRESS] A
WHERE A.LOCATION IS NOT NULL
ORDER BY LOCATION.STDistance(@X) ASC
and it works. However I would like to compute distance using Euclidean distance formula: sqrt((y1-y2)^2 + (x1-x2)^2)) and would like to have two separate columns for x and y positions if it's possible.