mysql mathematical operation,database

I have 4 column in my database, view name column, X cordinate,Y co ordinate ,Z coordinate

for each xyz coordinate there is one view name.

I want to run an sql query whcih will calculate for eg. ( sqrt root of ((x -x1)square+(y -y1)square + (z -z1)square)) and for each value of x,y,z cordinate in my whole column , it should show me the name of associated with that column if the ans is less than 100, beside each column for each value of x,y,z

can anybody help?

if question is not clear plz do reply.

simplified way of question is- i want to do some calculation with my xyz co ordinate with all the other cordinate in this table and if the ans is less than 100 it should show me the name of all that column for which the value is less than 100. and put it beside the xyz cordinate for which it got result..

and do the same for each xyz cordinate and put the result beside it..

i did it using excel..but not able to implement it,in myphpmyadmin sql database..

thanks...