If you are are using mysql you can use the function "JSON_ARRAY(column_name)" to get JSON values Refer to https://dev.mysql.com/doc/refman/5.7/en/json.html for further details. Example/Sample
SELECT JSON_ARRAY(id, name) FROM division
Resulting
JSON_ARRAY(id, name)
[1, "West Bengal"]
[2, "24 PARAGANAS SOUTH"]
[3, "Baruipur"]
[4, "BEGAMPUR G.P."]
[5, "HARAL (P)"]
However, if you have to get an object then USE JSON_OBJECT('key1', column_name1, ....,'keyn', coulmnn) Where key is a string and the other is the fieldname from a table.
Hope this helps.
With respect to your question, where you want just the Username (and NOT JSON) you can use the GROUP_CONCAT (ref: https://dev.mysql.com/doc/refman/5.5/en/group-by-functions.html#function_group-concat) which will just produce a comma-separated (default comma refer to the documentation to change the separator) values.
SELECT CONCAT( '["' , GROUP_CONCAT(Username SEPARATOR '", "') , '"]') FROM
FROM tableName GROUP BY Username
Though the user has not specified which database is he seeking solutions for (initially), later, he has added "[]" thus guessing that he is referring to SQLServer, if so, please follow the other answer by @jiri.