You can use substitutions in the query so you can use [user_id] for example to substitute the users id. A users connections are stored in the _comprofiler_members table. You'd need to join it with _comprofiler to get a list of their connections. Your select would need to grab first name from _comprofiler or also join _users for the full name, which you'd use as the option label parameter.
Beyond that I can't advise you much further. We do not provide custom coding here. You will have a very difficult time using CB Query Field with little to no SQL experience as it's entirely driven by SQL.