Sight down the length of your studs and pick out the straightest ones to glue to the cement floor. The straighter the piece of wood is, the less pressure there will be for it to pull away from the cement.
Spread construction adhesive in a zig-zag pattern along the length of the wood stud.
Place the stud with the adhesive side down onto the cement floor in the location where you need it to stay. Move it back and forth slightly to help adhere the adhesive to both the wood stud and the cement floor.
Place heavy items such as paint cans or cinder blocks on top of the wood stud for 24 hours, until the adhesive is dry. Alternatively, and for a more permanent bond, drill through the wood and into the cement with a hammer drill, then screw the wood stud to the cement floor using 3-inch-long masonry screws. If neither of these methods is an option, you can also cut additional studs to the exact length between the top of the stud that is glued to the floor and the bottom of the floor joists above, then wedge these studs in vertically to press the glued stud down against the floor.