Uri's comment on using a UDF is likely best. However, if you can't here's a different approach: it takes advantage of implicit casting using *1 and substring_index function which "Return a substring from a string before the specified number of occurrences of the delimiter"
SELECT Version
FROM foo
order by
SUBSTRING_INDEX( `version` , '.', 1 )*1,
SUBSTRING_INDEX(SUBSTRING_INDEX( `version` , '.', 2 ),'.',-1)*1,
SUBSTRING_INDEX(SUBSTRING_INDEX( `version` , '.', -2 ),'.',1)*1,
SUBSTRING_INDEX( `version` , '.', -1 )*1
additionally the values between the .'s can be of any length just as long as they are of numeric data type.