Ok this is a bit of a difficult one to visiualise but say with me.
Firstly you will need to decide which object you are selecting , so I suggest you check the layer and check the bounds. So say of instance I have a block of width and height 1 and its at coordinates (5,3) then I know that the area the mouse is able to click it will be (5,3) (5,4)(6,3)(6,4) . First problem sorted, now for movement . In order to move the object you will need to decide your rendering technique , you can use either shader based transformations or transformf , if its just a test of one object then use transformf if its a lot of objects I recomend you make a shader. There are other tutorials that expain that because this is a reply not an essay
. Once you have decided and understand how to perform transformations you must then check if you are scaling an object , what I mean by this is are you drawing a 2 by 2 sprite at size 4 by 4 , this can sometimes effect the way its rendered, especially if it directly effects the verticies. So after all of that you then apply this by performing , setposition(mouse.x,mouse.y) when clicked. simples , somewhat.
P.S : aplogies for my horrific spelling im here to program not to recite shakespear :0