Selecting a game object in Unity 2d

I am building a 2D turn based war game, the first obstacle i must overcome in making the script for the player is giving it the ability to select a sprite and then to either move that sprite to another location that is not occupied, or attacking another sprite, but for the time being I’m focusing on selecting a sprite, and then moving it, below is the code I’ve written so far, it does not function in selecting the sprite, selecting the sprite is my biggest issue at the moment

using UnityEngine;
using System.Collections;

public class PlayerBehavior : MonoBehaviour {

public bool PlayersTurn;
public int ActionsPerTurn;
public BoardManager boardManager;

private Vector3 SelectedPosition;
private bool enemysTurn;
void Start () {
	//boardManager = GetComponent<BoardManager> ();

}
// Update is called once per frame
void Update () {

}
GameObject ClickSelect()
{
	//Converting Mouse Pos to 2D (vector2) World Pos
	SelectedPosition = new Vector2(Camera.main.ScreenToWorldPoint(Input.mousePosition).x, Camera.main.ScreenToWorldPoint(Input.mousePosition).y);
	RaycastHit2D hit=Physics2D.Raycast(SelectedPosition, Vector2.zero, 0f);
	
	if (hit)
	{
		Debug.Log(hit.transform.name);
		return hit.transform.gameObject;
	}
	else return null;
}

}

@Brutalitywarlord

Here this has been tested and works ClickSelect()

using UnityEngine;
using System.Collections;

public class PlayerBehavior : MonoBehaviour
{
    public bool PlayersTurn;
    public int ActionsPerTurn;
    public BoardManager boardManager;

    private Vector3 SelectedPosition;
    private bool enemysTurn;

    void Start ()
    {
        //boardManager = GetComponent<BoardManager> ();
    }

    // Update is called once per frame
    void Update ()
    {
    }

    GameObject ClickSelect()
    {
        //Converting Mouse Pos to 2D (vector2) World Pos

        RaycastHit2D hit = Physics2D.Raycast(Camera.main.ScreenToWorldPoint(Input.mousePosition), Vector2.zero);

        if (hit)
        {
            Debug.Log(hit.transform.name);
            return hit.transform.gameObject;
        }
        else return null;
    }
}

You can also use Physics2D.OverlapPoint(Camera.main.ScreenToWorldPoint(Input.mousePosition); for getting a collider that overlaps a point on the screen.

simply copy and paste your problem will be fix:

   Vector2 mousepos; 
Vector2 mousepos2;
BoxCollider2D col;
bool selected = false;
bool move = false;
RaycastHit2D hit;
int clicks= 0;
// Use this for initialization
void Start () {
	mousepos2 = Camera.main.ScreenToWorldPoint (Input.mousePosition);
}

// Update is called once per frame
void Update () {
	mousepos = Camera.main.ScreenToWorldPoint (Input.mousePosition);
	if(Input.GetMouseButtonDown(0) && clicks == 0){
		Selected ();
	}
	Slectednotselected ();

	if(move){
		
		Move ();
	}
}

 void Selected(){
	hit = Physics2D.Raycast (mousepos, Vector2.zero);
	if (hit.collider.GetComponent<Rigidbody2D>() != null) {
		selected = true;
		clicks = 1;
		print (hit.collider.name);
		//hit.transform.position = Vector2.MoveTowards (hit.transform.position, mousepos, 5 * Time.deltaTime);
	}else{
		selected = false;
		print ("by");
	}
		}
	
void Move(){
	hit.transform.position = Vector2.MoveTowards (hit.transform.position, mousepos2, 5 * Time.deltaTime);
}
void Slectednotselected(){

	if (selected && Input.GetMouseButtonDown(0)) {
		mousepos2 = Camera.main.ScreenToWorldPoint (Input.mousePosition);
		print ("move");
		move = true;
	} else if (selected && Input.GetMouseButton (1)) {
		move = false;
		clicks = 0;
		selected = false;
	}
}

}