That's a many to many relationship (a user can have many languages, and viceversa) so to normalize the DB you should do a new table containing the two Foreign Keys (call it user_x_languages):
user_x_languages
================
user_id lang_id
99 44
99 45
you would need to remove the userid column from you languages table
the query should then use a join
select name lang from user u
join user_x_languages x on u.id = x.user_id
join languages l on x.lang_id = l.id
where u.id = 99;
that would output a row for each language the user has, it will however be repeating the username on each row.
You want to look into DB normalization, a very nice non-technical article is this: A Simple Guide to Five Normal Forms in Relational Database Theory
following the advice of this thread about returning one line, the procedure would be something like (I might have changed the table and column names a little bit from your original):
delimiter //
Create function languages (p_user varchar(30))
returns text
begin
DECLARE ret_val TEXT;
select GROUP_CONCAT(lang) into ret_val
from Users u
join user_x_lang x on u.user_id = x.user_id
join Lang l on x.lang_id = l.lang_id
where u.name = p_user;
return ret_val;
end//
delimiter ;
and now the select should be (for all users):
select name, languages(name) from users;