def select_whole_row(conn, table_name, cond_col, cond_value):
    """
    Query a table to retrieve a whole row based on condition.
    :param conn: connection object,
    :param table_name: table to be searched,
    :param cond_col: column to be used as condition,
    :param cond_value: value to be matched,
    :return: result.
    """
    cur = conn.cursor()
    cur.execute(f"SELECT * FROM {table_name} WHERE {cond_col} = '{cond_value}'")
    result = cur.fetchall()[0]

    return result